Data access in previous application programs, especially web-based application programs, is generally coded at a relatively low level, e.g., using a specific dialect of SQL to access a specific type of database. Thus, portions of the application may need to be recoded if the database is replaced with a new type of database. Specifically, it would require every new data element accessor to be compiled in the interpreter of the programming language underlying the application. This makes the application programs very inflexible and non-reusable, and overly expensive because the application providers have to recode the application program to fit different consumers' data needs.
In addition, there is another drawback related to data access in previous web-based application programs, such as CGI (Common Gateway Interface) programs. For example, if a CGI program needs to access a database, the program typically opens a database connection and then closes the connection once it is done. Since opening and closing database connections are expensive operations, these operations may significantly decrease the performance of the web server each time a CGI program runs. At a more detailed program coding level, each time when a new type of data source needs to be accessed, the interpreter has to interpret the data element accessor before the code script can be further executed to access the data elements. As a result, it would be difficult to keep the application running continuously where accessing and retrieving dynamic data is needed frequently at runtime.
The above-described problems can be best illustrated in e-commerce transactions, such as online travel booking, where the web-based application needs to access and retrieve dynamic data from different data sources or databases (e.g., user data, air data, hotel data) on a real-time basis. With the increase of web-based applications in need of frequent retrieving dynamic data, there exists a need to decouple the data retrieval process from the underlying applications so that the dynamic data elements from various existing data resources can be obtained without requiring code changes to the underlying applications. To that end, it is an object to code the data retrieval process in platform-independent programming language that provides common data documents for transporting data between two application programs and/or between an application program and a resource factory. It is also an object to structure or define data elements in platform-independent object-oriented programming language, such as Java, so that the structured data objects can be embedded within the common data document and be easily transported between applications and/or application and data repository. It is a further object to use a reflection mechanism for populating a complex object model implementation with data in the internal format of the application clients based upon the metadata in an external format contained in the transport mechanism document.